{$layout}

<!-- 检测配置是否有更新 begins -->
<div class="ui icon message warning" v-if="statusChanged">
    <i class="exclamation circle icon large"></i>
    代理服务已被修改，<a href="" v-on:click.prevent="restart()">点此重启后生效</a>
</div>

{$var "header"}
<link rel="stylesheet" href="/_/@default/proxy/@global.css"/>
<script type="text/javascript" src="/_/@default/proxy/@global.js"></script>
{$end}
<!--  检测配置是否有更新 end -->

<div>
    {$template "menu"}

    <h3>基本信息<a :href="'/proxy/update?server=' + proxy.filename">修改</a></h3>

    <table class="ui table selectable definition">
        <tr>
            <td class="title">代理服务名称</td>
            <td>{{proxy.description}}</td>
        </tr>
        <tr>
            <td class="title">是否开启HTTP</td>
            <td>
                <span class="ui label tiny green" v-if="proxy.http">已开启</span>
                <span class="ui label tiny" v-if="!proxy.http">未开启</span>
            </td>
        </tr>
        <tr>
            <td>域名<em>(name)</em></td>
            <td colspan="2">
                <a class="disabled" v-if="proxy.name.length == 0">[还没有绑定域名]</a>
                <span class="ui label small" v-for="name in proxy.name">{{name}}</span>
            </td>
        </tr>
        <tr>
            <td>绑定地址<em>(listen)</em></td>
            <td colspan="2">
                <a class="disabled" v-if="proxy.listen.length == 0">[还没有绑定网络地址]</a>
                <span class="ui label small" v-for="listen in proxy.listen">{{listen}}</span>
            </td>
        </tr>

        <!-- 文档根目录 -->
        <tr>
            <td>文档根目录<em>(root)</em></td>
            <td>
                <span style="word-break: break-all;" v-if="proxy.root.length > 0">{{proxy.root}}</span>
                <a class="disabled" v-if="proxy.root.length == 0">还没有设置。</a>
            </td>
        </tr>

        <!-- 字符编码 -->
        <tr>
            <td>字符编码<em>(charset)</em></td>
            <td>
                <span v-if="proxy.charset.length > 0">{{proxy.charset}}</span>
                <a class="disabled" v-if="proxy.charset.length == 0">还没有设置。</a>
            </td>
        </tr>

        <!-- 首页文件 -->
        <tr>
            <td>首页文件<em>(index)</em></td>
            <td>
                <a class="disabled" v-if="proxy.index.length == 0">还没有设置。</a>
                <span class="ui label small" v-for="index in proxy.index">{{index}}</span>
            </td>
        </tr>
    </table>
</div>